#!/bin/bash
apt-get update
apt-get upgrade -y
apt-get install nginx mysql-server mysql-server mysql-client php5-fpm
rm -rf /etc/nginx/sites-enabled/default
cp setup/nginx/default /etc/nginx/sites-enabled/default
apt-get install -y php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl 
# needed to create the webcam images
apt-get install -y streamer
# this one is a quickfix to allow www-data to execute the /usr/bin/streamer and create snapshots, for some reason adding the www-data to the video group is not enough
echo "www-data ALL = NOPASSWD: /usr/bin/streamer" >> /etc/sudoers
# we ll need subversion/git and while we're at it we install php-apc to have our rasp work less and phpmyadmin
apt-get install -y subversion git php-apc phpmyadmin

